//
//  PhotoCell.m
//  BeanTrip
//
//  Created by dlios on 15-7-8.
//  Copyright (c) 2015年 PandaGroup. All rights reserved.
//

#import "PhotoCell.h"
#define WIDTH ([UIScreen mainScreen].bounds.size.width/375)
#define HEIGHT ([UIScreen mainScreen].bounds.size.height/667)

@implementation PhotoCell
- (void)dealloc
{
    [_myImageView release];
    [_myBackgroundView release];
    [_myScrollView release];
    [_myTextLabel release];
    [_myTimeLabel release];
    [_dayTimeArrLabel release];
    [super dealloc];
}


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        
        
        self.myImageView = [[UIImageView alloc] init];
        
        [self.contentView addSubview:self.myImageView];
        [_myImageView release];
        
        
        
        
        self.myBackgroundView = [[UIView alloc] initWithFrame:CGRectMake(0, (HEIGHT*667- 64 - 49) / 5 * 4 , WIDTH*375, (HEIGHT*667 - 64- 49) / 5)];
        [self.contentView addSubview:self.myBackgroundView];
        [_myBackgroundView release];
//        self.myBackgroundView.backgroundColor = [UIColor colorWithRed:25 / 255.0 green:25 / 255.0 blue:25 / 255.0 alpha:0.5];
        self.myBackgroundView.backgroundColor = [UIColor clearColor];
        
        
        self.myScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, WIDTH*375, 60*HEIGHT)];
        [self.myBackgroundView addSubview:self.myScrollView];
        [_myScrollView release];

        
        self.myTextLabel = [[UILabel alloc] init];
//        self.myTextLabel.frame = CGRectMake(0, 0, WIDTH, rect.size.height);
//        self.myTextLabel.font = [UIFont systemFontOfSize:14];
        self.myTextLabel.numberOfLines = 0;
        self.myTextLabel.textAlignment = NSTextAlignmentCenter;
        self.myTextLabel.lineBreakMode = NSLineBreakByCharWrapping;
        self.myTextLabel.font = [UIFont fontWithName:@"Helvetica-BoldOblique" size:16*HEIGHT];
        self.myTextLabel.textColor = [UIColor whiteColor];
        [self.myScrollView addSubview:self.myTextLabel];
        [_myTextLabel release];
        
        self.myTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(30*WIDTH, 70*HEIGHT, WIDTH*375 / 2, 20*HEIGHT)];
//        self.myTimeLabel.font = [UIFont systemFontOfSize:14*HEIGHT];
        self.myTimeLabel.textColor = [UIColor whiteColor];
        self.myTimeLabel.font = [UIFont fontWithName:@"Helvetica-BoldOblique" size:14*HEIGHT];
        [self.myBackgroundView addSubview:self.myTimeLabel];
        [_myTimeLabel release];
        
        //上面的图片数量
        self.dayTimeArrLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 50*HEIGHT, 375*WIDTH, 50*HEIGHT)];
        [self.contentView addSubview:self.dayTimeArrLabel];
        self.dayTimeArrLabel.textAlignment = NSTextAlignmentCenter;
        self.dayTimeArrLabel.textColor = [UIColor whiteColor];
        self.dayTimeArrLabel.font = [UIFont fontWithName:@"Helvetica-BoldOblique" size:18*HEIGHT];
        [_dayTimeArrLabel release];

        
        
    }
    return self;
}

@end
